using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Tilemaps;

public class GameManager : Singleton_Base<GameManager>
{
    public override bool isDontDestroy => false;
    public enum ColorType
    {
        None,
        Blue,
        Green,
        Red,
    }
    public ObjectGroup<ColorType, Color> gameColor_Group;
    public ObjectGroup<ColorType, Material> gameColorMaterial_Group;
    public ObjectGroup<string, AnimationCurve> curve_Group;
    public ObjectGroup<string, Tilemap> tileBase_Group;
    //public ObjectGroup<string, Color> gameColor_Group;

    public Material lit_Material;
    public Material unlit_Material;

    public System.Action<float, float> playerMpChangeAction;


    public float playerCharactor_Mp
    {
        get
        {
            return Player_Ctrl.instance.charactor_Ctrl.mp;
        }
    }
    public float playerCharactor_MpMax
    {
        get
        {
            return Player_Ctrl.instance.charactor_Ctrl.mpMax;
        }
    }
    // Start is called before the first frame update

        
    void Start()
    {
        Application.targetFrameRate = 80;

        EventManager.Instance.Regist(CharactorControlType.GetItem.ToString(),this.GetInstanceID(), objects => {
            string itemName = (string)objects[0];
            switch (itemName)
            {
                case "LightBlub":
                    Player_Ctrl.instance.charactor_Ctrl.mpMax += 1;
                    Player_Ctrl.instance.charactor_Ctrl.mp += 1;
                    break;
            }
        });

    }

}
